Bugfix: Content Picker, gets dynamic root value from menu context #2212
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In the Content Picker, (formerly Multinode Treepicker), to set the start node of the picker (using Dynamic Root), the
UMB_ENTITY_WORKSPACE_CONTEXT
was used to get the unique ID of the entity. However, when using the Content Picker within a Block Grid/List, the workspace context was for the Block, not the top-most entity, e.g. a document.Rather than attempt to query the Block's modal context (for the parent entity workspace context), I have opted to use the
UmbMenuStructureWorkspaceContext.structure
to get the top-most entity workspace's unique and parent unique values.(We were already using this to get the
parent
unique)Fixes umbraco/Umbraco-CMS#16632.
Types of changes
How to test?